/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import com.sun.xml.internal.ws.api.PropertySet.Property;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.jar.Attributes.Name;
import javax.persistence.AttributeOverride;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author mehdi
 */
@Entity
public class Learner implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long Leid;
   
   private String Nale;
   
   private String Fnle;
  
   private String Emle;
   
   private String Edle;
   
   private String Cile;
 
   private String Cole;
   
   private int Pcle;
   
   private String Dble;
   
   private String Lest;
   
   
    @OneToOne
   public Account account;
   
    @ManyToMany
   private  java.util.Collection<Module> module;
   
  @ManyToMany(cascade= CascadeType.ALL)
  private  java.util.List<AnswerL> AnswerL;

    public Learner() {
    }
  
    
    public Long getId() {
        return Leid;
    }

    public void setId(Long id) {
        this.Leid = id;
    }

    public List<model.AnswerL> getAnswerL() {
        return AnswerL;
    }

    public void setAnswerL(List<model.AnswerL> AnswerL) {
        this.AnswerL = AnswerL;
    }

    public String getCile() {
        return Cile;
    }

    public void setCile(String Cile) {
        this.Cile = Cile;
    }

    public String getCole() {
        return Cole;
    }

    public void setCole(String Cole) {
        this.Cole = Cole;
    }

    public String getDble() {
        return Dble;
    }

    public void setDble(String Dble) {
        this.Dble = Dble;
    }

    public String getEdle() {
        return Edle;
    }

    public void setEdle(String Edle) {
        this.Edle = Edle;
    }

    public String getEmle() {
        return Emle;
    }

    public void setEmle(String Emle) {
        this.Emle = Emle;
    }

    public String getFnle() {
        return Fnle;
    }

    public void setFnle(String Fnle) {
        this.Fnle = Fnle;
    }

    public String getLest() {
        return Lest;
    }

    public void setLest(String Lest) {
        this.Lest = Lest;
    }

    public String getNale() {
        return Nale;
    }

    public void setNale(String Nale) {
        this.Nale = Nale;
    }

    public int getPcle() {
        return Pcle;
    }

    public void setPcle(int Pcle) {
        this.Pcle = Pcle;
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    public Collection<Module> getModule() {
        return module;
    }

    public void setModule(Collection<Module> module) {
        this.module = module;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (Leid != null ? Leid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Learner)) {
            return false;
        }
        Learner other = (Learner) object;
        if ((this.Leid == null && other.Leid != null) || (this.Leid != null && !this.Leid.equals(other.Leid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Learner[ id=" + Leid + " ]";
    }
    
}
